package com.cal.utms.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the instrument_floating_rates database table.
 * 
 */
@Entity
@Table(name="instrument_floating_rates")
@NamedQuery(name="InstrumentFloatingRate.findAll", query="SELECT i FROM InstrumentFloatingRate i")
public class InstrumentFloatingRate implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;

	private BigDecimal rate;

	@Temporal(TemporalType.DATE)
	@Column(name="STARTING_DATE")
	private Date startingDate;
	
	@Temporal(TemporalType.DATE)
	@Column(name="NEXT_RESET")
	private Date nextReset;

	//bi-directional many-to-one association to Instrument
	@ManyToOne
	private Instrument instrument;

	public InstrumentFloatingRate() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public BigDecimal getRate() {
		return this.rate;
	}

	public void setRate(BigDecimal rate) {
		this.rate = rate;
	}

	public Date getNextReset() {
		return nextReset;
	}

	public void setNextReset(Date nextReset) {
		this.nextReset = nextReset;
	}

	public Date getStartingDate() {
		return this.startingDate;
	}

	public void setStartingDate(Date startingDate) {
		this.startingDate = startingDate;
	}

	public Instrument getInstrument() {
		return this.instrument;
	}

	public void setInstrument(Instrument instrument) {
		this.instrument = instrument;
	}

}
